🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / core / ble / src / jvmMain / kotlin / org / meshtastic / core / ble / KablePlatformSetup.kt
Displaying Raw • Download
core/ble/src/jvmMain/kotlin/org/meshtastic/core/ble/KablePlatformSetup.kt 2d20cd8a4708e2ef66e98d5259f3a97ec93f240a (2d20cd8a) Text, 1.74 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.ble
Tff7b72import T7ee787com.juul.kable.Peripheral
Tff7b72import T7ee787com.juul.kable.PeripheralBuilder
Tff7b72import T7ee787com.juul.kable.toIdentifier
Tff7b72internal Tff7b72actual Tff7b72fun Te6edf3PeripheralBuilderTb4b4b4.Td2a8ffplatformConfigTb4b4b4(Te6edf3deviceTb4b4b4: Te6edf3BleDeviceTb4b4b4, Te6edf3autoConnectTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657BooleanTb4b4b4) Tb4b4b4{
T8b949e// Desktop Kable uses direct connections without needing autoConnect.
Tb4b4b4}
Tff7b72internal Tff7b72actual Tff7b72fun Td2a8ffcreatePeripheralTb4b4b4(Te6edf3addressTb4b4b4: Tffa657StringTb4b4b4, Te6edf3builderActionTb4b4b4: Te6edf3PeripheralBuilderTb4b4b4.Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4)Tb4b4b4: Te6edf3Peripheral Tff7b72=
Te6edf3comTb4b4b4.Te6edf3juulTb4b4b4.Te6edf3kableTb4b4b4.Te6edf3PeripheralTb4b4b4(Te6edf3addressTb4b4b4.Te6edf3toIdentifierTb4b4b4(Tb4b4b4)Tb4b4b4, Te6edf3builderActionTb4b4b4)
T8b949e// JVM/desktop Kable does not expose an MTU StateFlow; return a reasonable default (512)
T8b949e// so callers can size their writes without falling back to an overly conservative minimum.
Tff7b72internal Tff7b72actual Tff7b72fun Te6edf3PeripheralTb4b4b4.Td2a8ffnegotiatedMaxWriteLengthTb4b4b4(Tb4b4b4)Tb4b4b4: Tffa657Int? Tff7b72= Te6edf3DEFAULT_JVM_MTU
Tff7b72internal Tff7b72actual Tff7b72fun Te6edf3PeripheralTb4b4b4.Td2a8ffrequestHighConnectionPriorityTb4b4b4(Tb4b4b4)Tb4b4b4: Tffa657Boolean Tff7b72= Tff7b72false
Tff7b72internal Tff7b72actual Tff7b72fun Te6edf3PeripheralTb4b4b4.Td2a8ffrequestBalancedConnectionPriorityTb4b4b4(Tb4b4b4)Tb4b4b4: Tffa657Boolean Tff7b72= Tff7b72false
Tff7b72internal Tff7b72actual Tff7b72fun Te6edf3PeripheralTb4b4b4.Td2a8ffrefreshGattCacheTb4b4b4(Tb4b4b4)Tb4b4b4: Tffa657Boolean Tff7b72= Tff7b72false
Tff7b72private Tff7b72const Tff7b72val Te6edf3DEFAULT_JVM_MTU Tff7b72= T79c0ff5T79c0ff1T79c0ff2
Served by rngit 1.5.0 - Generated in 0.06s